import React, { useState } from 'react'
import { Button } from 'antd'

interface Greeting {
  name: string;
  firstName?: string,
  lastName?: string
}

const HelloHook = (props: Greeting) => {
  const [count, setCount] = useState(0)
  // const [text, setText] = useState< string | null >(null)

  return (
    <div>
      <p>你点击了{ count }</p>
      <Button onClick={() => { setCount(count + 1) } }>hello { props.name }</Button>
    </div>
  )

}

export default HelloHook